-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Global_slot_since_genesis
for stop slots
#15513
Open
mrmr1993
wants to merge
2
commits into
berkeley
Choose a base branch
from
fix/use-global-slot-since-genesis
base: berkeley
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+102
−70
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!ci-build-me |
!ci-nightly-me |
nholland94
reviewed
Apr 11, 2024
Comment on lines
+1099
to
+1118
let open Mina_numbers in | ||
let global_slots_since_hard_fork = | ||
let global_slot_since_hard_fork = | ||
Consensus.Data.Consensus_time.( | ||
to_global_slot | ||
(of_time_exn ~constants:consensus_constants | ||
(Block_time.now time_controller) )) | ||
in | ||
Option.value_exn | ||
@@ Global_slot_since_hard_fork.( | ||
diff global_slot_since_hard_fork zero) | ||
in | ||
let open Mina_numbers in | ||
Global_slot_since_genesis.add | ||
( match constraint_constants.fork with | ||
| None -> | ||
Global_slot_since_genesis.zero | ||
| Some { global_slot_since_genesis; _ } -> | ||
global_slot_since_genesis ) | ||
global_slots_since_hard_fork |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to be doing this sort of computation in mutliple places in this PR. Can we turn this into a utility function at the global slot module layer? I don't want us getting this conversion wrong in some contexts.
emberian
approved these changes
Apr 11, 2024
Base automatically changed from
georgeee/use-slot_tx_end_or_default-in-fork_config
to
berkeley
April 11, 2024 22:52
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the correct fix for the consistency issue 'fixed' in #15503. The global slot since hard fork was incorrectly used in the original PR #14516; we fix the issue by using the global slot since genesis instead, so that an emergency hard-fork post-berkeley will not force us to use an unrepresentative stop slot.